package com.mybatisplus.demo.android.enmu;

/**
 * Created by cmazxiaoma on 2017/10/29.
 * everyday is mayday.
 */
public enum ResultCode {
    UNKNOW_ERROR(404, "未知错误"),
    SUCCESS(200, "success"),
    ERROR(501, "error"),
    PASSWORD_ERROR(201, "密码错误"),
    USERNAME_ERROR(202, "用户名错误"),
    USERNAME_NULL(203, "用户名为空"),

    USER_ID_ISEXIST(204, "用户已存在"),
    USER_CREATE_ERROR(205, "创建用户失败"),
    VERIFY_NAME_NULL(207, "用户不能为空"),
    VERIFY_PASSWORD_NULL(208, "密码不能为空"),
    PASSWORD_CREATE_ERROR(206, "创建用户密码失败"),
    USER_ID_NOTEXIST(215, "用户不存在"),

    PARAM_ERROR(209, "参数错误"),
    DEVICE_SN_ISEXIST(210, "设备已存在"),
    ADD_DEVICE_ERROR(211, "设备添加失败"),
    DEVICE_NOT_ISEXIST(212, "设备不存在"),
    DETELE_DEVICE_ERROR(213, "设备删除失败"),
    UPDATE_DEVICE_ERROR(214, "设备信息变更失败"),

    FILE_NOT_ISEMPTY(216, "文件不能为空"),

    UNAUTHORIZED(401, "no authorized"),
    NOT_FOUND(404, "not found"),
    INTERNAL_SERVER_ERROR(500, "internal server error"),
    LOLITA(1, "lolita"),
    ROYAL_SISTER(2, "royal sister"),
    YOUNG_WOMAN(3, "young woman"),
    AUNT(4, "aunt"),
    REPEATABLE_DATA(5, "repeatable data"),
    VERIFY_SUCCESS(6, "验证成功"),

    REGISTER_ERROE(9, "失败"),

    DBCODE_SERROR(11, "用户已存在"),
    DBCODE_ERROR(12, "error"),


    AUTH_ERROR(10010, "身份验证失败");

    private Integer code;
    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
